package com.party.mobile.web.dto.crowdfund.output;


import com.party.core.model.crowdfund.ProjectWithAuthor;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * 众筹列表输出视图
 * Created by wei.li.
 *
 * @date 2017/12/27 0027
 * @time 10:53
 */
public class ProjectForListOutput {

    //编号
    private String id;

    //创建者名称
    private String authorName;

    //创建者图片
    private String authorLogo;

    //创建者公司
    private String authorCompany;

    //创建者职务
    private String authorJobTitle;

    //创建者电话
    private String authorMobile;

    //实际筹集资金
    private Float actualAmount;

    //支持者数目
    private Integer favorerNum;

    //创建时间
    private Date createDate;

    //二维码
    private String qrCodeUrl;

    //是否成功
    private Integer isSuccess;

    // 众筹成功海报路径
    private String posterUrl;

    //  是否为多场活动的项目
    private Integer isMultiple;


    public Integer getIsMultiple() {
        return isMultiple;
    }

    public void setIsMultiple(Integer isMultiple) {
        this.isMultiple = isMultiple;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getAuthorLogo() {
        return authorLogo;
    }

    public void setAuthorLogo(String authorLogo) {
        this.authorLogo = authorLogo;
    }

    public String getAuthorCompany() {
        return authorCompany;
    }

    public void setAuthorCompany(String authorCompany) {
        this.authorCompany = authorCompany;
    }

    public String getAuthorJobTitle() {
        return authorJobTitle;
    }

    public void setAuthorJobTitle(String authorJobTitle) {
        this.authorJobTitle = authorJobTitle;
    }

    public String getAuthorMobile() {
        return authorMobile;
    }

    public void setAuthorMobile(String authorMobile) {
        this.authorMobile = authorMobile;
    }

    public Float getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(Float actualAmount) {
        this.actualAmount = actualAmount;
    }

    public Integer getFavorerNum() {
        return favorerNum;
    }

    public void setFavorerNum(Integer favorerNum) {
        this.favorerNum = favorerNum;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public Integer getIsSuccess() {
        return isSuccess;
    }

    public void setIsSuccess(Integer isSuccess) {
        this.isSuccess = isSuccess;
    }

    public static ProjectForListOutput transform(ProjectWithAuthor projectWithAuthor){
        ProjectForListOutput projectForListOutput = new ProjectForListOutput();
        BeanUtils.copyProperties(projectWithAuthor, projectForListOutput);
        return projectForListOutput;
    }

    public String getPosterUrl() {
        return posterUrl;
    }

    public void setPosterUrl(String posterUrl) {
        this.posterUrl = posterUrl;
    }
}
